<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>俄罗斯方块</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background: #e0e5ec;
            /* 新拟态基础背景色 */
            overflow: hidden;
        }

        #game-wrapper {
            position: relative;
            width: 100vw;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        #game-container {
            position: relative;
            transform: scale(0.95);
            padding: 20px;
            border-radius: 15px;
            background: #e0e5ec;
            box-shadow:
                8px 8px 15px #a3b1c6,
                -8px -8px 15px #ffffff;
        }

        #game-canvas {
            border-radius: 10px;
            background: #e0e5ec;
            box-shadow:
                inset 5px 5px 10px #a3b1c6,
                inset -5px -5px 10px #ffffff;
            margin: 0;
        }

        #score {
            position: absolute;
            top: 20px;
            right: -150px;
            padding: 8px 15px;
            font-size: 18px;
            border-radius: 10px;
            background: #e0e5ec;
            box-shadow:
                5px 5px 10px #a3b1c6,
                -5px -5px 10px #ffffff;
            color: #2d4059;
            font-family: Arial, sans-serif;
            width: 100px;
            /* 固定宽度 */
            text-align: center;
            box-sizing: border-box;
            /* 包含内边距在宽度内 */
            z-index: 2;
            /* 添加层级 */
        }

        #next-piece {
            position: absolute;
            top: 80px;
            /* 增加与分数的距离 */
            right: -150px;
            width: 100px;
            /* 与分数显示相同的宽度 */
            height: 100px;
            border-radius: 10px;
            background: #e0e5ec;
            box-shadow:
                inset 5px 5px 10px #a3b1c6,
                inset -5px -5px 10px #ffffff;
            padding: 10px;
            box-sizing: border-box;
            /* 包含内边距在宽度内 */
            z-index: 1;
            /* 添加层级 */
        }

        /* 游戏结束样式 */
        .game-over-text {
            color: #2d4059;
            text-shadow:
                2px 2px 4px #a3b1c6,
                -2px -2px 4px #ffffff;
        }

        /* 添加按钮悬停效果 */
        .restart-hint {
            padding: 10px 20px;
            border-radius: 8px;
            background: #e0e5ec;
            box-shadow:
                5px 5px 10px #a3b1c6,
                -5px -5px 10px #ffffff;
            transition: all 0.3s ease;
        }

        .restart-hint:hover {
            box-shadow:
                inset 5px 5px 10px #a3b1c6,
                inset -5px -5px 10px #ffffff;
        }
    </style>
</head>

<body>
    <div id="game-wrapper">
        <div id="game-container">
            <canvas id="game-canvas"></canvas>
            <div id="score">分数: <span id="score-value">0</span></div>
            <canvas id="next-piece"></canvas>
        </div>
    </div>
    <script src="tetris.js"></script>
</body>

</html>